home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / DesktopDoubler / Nub / DisplayManager.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-26  |  1.1 KB  |  47 lines  |  [TEXT/CWIE]

  1. #ifndef _DISPLAYMANAGER_
  2. #define _DISPLAYMANAGER_
  3.  
  4. #include <MacTypes.h>
  5. #include <MacMemory.h>
  6. #include <QuickDraw.h>
  7. #include "Display.h"
  8. #include "LList.h"
  9.  
  10.  
  11. typedef class DisplayManager
  12. {
  13.     public:
  14.         void *operator new(size_t len)    { return (void*)NewPtrSysClear(len); }
  15.         void operator delete(void *data) { DisposePtr((Ptr)data); }
  16.         
  17.         DisplayManager(void);
  18.         ~DisplayManager(void);
  19.         
  20.         OSStatus Initialize(UInt32 numVirtualDisplays);
  21.         void Idle(Point where);
  22.         void Swap(Display *display);
  23.         void MBarClick(Display *display,Point where);
  24.         void SetMBarTracker(Point where,Boolean track);
  25.         void OffsetMBarMouse(Point *where);
  26.         void Refresh(void);
  27.         
  28.         Display *FindDisplay(Point where);
  29.         Display *FindDisplay(DisplayIDType displayID);
  30.         Display *GetCurDisplay(void) { return fCurDisplay; }
  31.         
  32.     private:
  33.         UInt32                fDisplayCount;
  34.         GDHandle            fMainDevice;
  35.         GDHandle            fCloneDevice;
  36.         LList<Display>        fDisplayList;
  37.         Display                *fCloneDisplay;
  38.         Display                *fCurDisplay;
  39.         Display                *fMBarTracker;
  40.         Boolean                fDMNotifierInstalled;
  41.         
  42.         OSStatus AddDisplay(UInt32 index);
  43. } DisplayManager;
  44.  
  45.  
  46. #endif /* _DISPLAYMANAGER_ */
  47.